<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/10/4
 * Time: 16:35
 */

namespace App\Services;


use App\Lib\Option;
use EasySwoole\Core\Component\Logger;

class BaseService
{
    protected $logger;
    public function __construct()
    {

        $this->logger = new Logger();
    }

    /**
     * 返回缺参结果
     * @param $operation
     * @param $prameter
     * @return array
     */
    protected function _missingPrameterArr($operation, $prameter)
    {
        return array('result'=>Option::MISSING_PARAMETER,'operation'=>$operation,'data'=>array("missing_parameter"=>$prameter),'result_message'=>"缺少参数");
    }

    protected function _notAllowArr($operation, $prameter, $message){
        return array('result'=>Option::DATA_NOTALLOW,'operation'=>$operation,'data'=>$prameter,'result_message'=>$message);
    }

    protected function _messageArr($operation, $prameter, $message, $result){

    }
}